From: Ævar Arnfjörð Bjarmason Date: Sun, 11 Dec 2005 03:03:34 +0000 (+0000) Subject: * Add hooks that run before the special page function call, after it, and before... X-Git-Tag: 1.6.0~971 X-Git-Url: http://git.cyclocoop.org/%28%5B%5E/404?a=commitdiff_plain;h=cbd23d0d7ceceb074f8182cc06b89d9c394cc347;p=lhc%2Fweb%2Fwiklou.git * Add hooks that run before the special page function call, after it, and before that header thingy --- diff --git a/includes/SpecialPage.php b/includes/SpecialPage.php index d1eececad5..622cf66e60 100644 --- a/includes/SpecialPage.php +++ b/includes/SpecialPage.php @@ -412,8 +412,13 @@ class SpecialPage if(!function_exists($func) and $this->mFile) { require_once( $this->mFile ); } - $this->outputHeader(); + if ( wfRunHooks( 'SpecialPageExecuteBeforeHeader', array( &$this, &$par, &$func ) ) ) + $this->outputHeader(); + if ( ! wfRunHooks( 'SpecialPageExecuteBeforePage', array( &$this, &$par, &$func ) ) ) + return; $func( $par, $this ); + if ( ! wfRunHooks( 'SpecialPageExecuteAfterPage', array( &$this, &$par, &$func ) ) ) + return; } else { $this->displayRestrictionError(); }